***Code for Predictors of Voter Fraud Typification Beliefs (Section C)
***Supplemental Material for "Your Typical Criminal: Why White Americans Hate Voter Fraud"
***Authors: Adriano Udani, David C. Kimball, and Anita Manion
***Date: 1/29/24

***2017 CCES module
***Data file: cces17umsl.dta

***Recode variables
***Voter fraud typification
gen vfimm = UMS437/100
gen vfblack = UMS438/100
gen vfwhite = UMS438x/100
lab var vfimm "Voter fraud typification - immigrants"
lab var vfblack "Voter fraud typification - black"
lab var vfwhite "Voter fraud typification - white"

***Immigrant resentment
recode UMS430 (1=1) (2=.75) (3=.5) (4=.25) (5=0), gen(imcrime)
recode UMS431 (1=0) (2=.25) (3=.5) (4=.75) (5=1), gen(imecon)
recode UMS432 (1=1) (2=.75) (3=.5) (4=.25) (5=0), gen(imcult)
alpha imcrime imecon imcult, item gen(ir1)
lab var ir1 "Immigrant resentment"

***Racial issues
recode CC17_351a (1=0) (2=.25) (3=.5) (4=.75) (5=1), gen(rangry)
recode CC17_351b (1=0) (2=.25) (3=.5) (4=.75) (5=1), gen(wadv)
recode CC17_351c (1=1) (2=.75) (3=.5) (4=.25) (5=0), gen(orfear)
recode CC17_351d (1=1) (2=.75) (3=.5) (4=.25) (5=0), gen(rprare)
alpha rangry wadv rprare, item gen(rissues)

***Party ID
***Higher values indicate Republicans
recode pid7 (8=4), gen(pi7)
lab var pi7 "Party ID - 7pt"
gen pi1 = (pi7 - 1)/6
lab var pi1 "Party ID - 7pt"
***Dummies for party leaners
recode pi7 (1/3=1) (4/7=0), gen(dlean)
recode pi7 (1/4=0) (5/7=1), gen(rlean)
lab var dlean "Democrat, including leaners"
lab var rlean "Republican, including leaners"

***Race
recode race (1=1) (2/8=0), gen(white)
***Education
gen ed1 = (educ - 1)/5
***Age
gen age1 = ((2017 - birthyr) - 18)/70
***Female
recode gender (1=0) (2=1), gen(female)
***Political Interest
recode newsint (1=1) (2=.67) (3=.33) (4=0) (7=.5), gen(ni1)
lab var ni1 "Political interest"

***Explaining voter fraud typification beliefs
***SM Table 25. Model 1 - predictors of immigrant voter fraud typification, white respondents, full sample
reg vfimm ir1 pi1 ni1 age1 ed1 female [aw= weights_UMS] if white==1
***SM Table 25. Model 2 - predictors of immigrant voter fraud typification, white respondents, Democrats
reg vfimm ir1 ni1 age1 ed1 female [aw= weights_UMS] if white==1 & dlean==1
***SM Table 25. Model 3 - predictors of immigrant voter fraud typification, white respondents, Republicans
reg vfimm ir1 ni1 age1 ed1 female [aw= weights_UMS] if white==1 & rlean==1

***SM Table 26. Model 1 - predictors of Black voter fraud typification, white respondents, full sample
reg vfblack rissues pi1 ni1 age1 ed1 female [aw= weights_UMS] if white==1
***SM Table 26. Model 2 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfblack rissues ni1 age1 ed1 female [aw= weights_UMS] if white==1 & dlean==1
***SM Table 26. Model 3 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfblack rissues ni1 age1 ed1 female [aw= weights_UMS] if white==1 & rlean==1

***SM Table 27. Model 1 - predictors of Black voter fraud typification, white respondents, full sample
reg vfwhite ir1 pi1 ni1 age1 ed1 female [aw= weights_UMS] if white==1
***SM Table 27. Model 2 - predictors of Black voter fraud typification, white respondents, full sample
reg vfwhite rissues pi1 ni1 age1 ed1 female [aw= weights_UMS] if white==1
***SM Table 27. Model 3 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfwhite ir1 ni1 age1 ed1 female [aw= weights_UMS] if white==1 & dlean==1
***SM Table 27. Model 4 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfwhite rissues ni1 age1 ed1 female [aw= weights_UMS] if white==1 & dlean==1
***SM Table 27. Model 5 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfwhite ir1 ni1 age1 ed1 female [aw= weights_UMS] if white==1 & rlean==1
***SM Table 27. Model 6 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfwhite rissues ni1 age1 ed1 female [aw= weights_UMS] if white==1 & rlean==1


***2018 CCES module
***Data file: cces18umsl.dta

***Recode variables
***Voter fraud typification
gen vflatin = UMS332/100
gen vfblack = UMS331/100
gen vfwhite = UMS330/100
gen vfarab = UMS333/100
lab var vflatin "Voter fraud typification - latinx"
lab var vfblack "Voter fraud typification - black"
lab var vfwhite "Voter fraud typification - white"
lab var vfarab "Voter fraud typification - arab"

***Social dominance orientation
recode UMS312 (1 = 5 "Strongly Agree") (2 = 4 "Agree") (3 = 3 "Neither Agree or Disagree") (4 = 2 "Disagree") (5 = 1 "Strongly Disagree"), gen(UMS312_1)
recode UMS313 (1 = 5 "Strongly Agree") (2 = 4 "Agree") (3 = 3 "Neither Agree or Disagree") (4 = 2 "Disagree") (5 = 1 "Strongly Disagree"), gen(UMS313_1)
recode UMS314 (1 = 5 "Strongly Agree") (2 = 4 "Agree") (3 = 3 "Neither Agree or Disagree") (4 = 2 "Disagree") (5 = 1 "Strongly Disagree"), gen(UMS314_1)
recode UMS316 (1 = 5 "Strongly Agree") (2 = 4 "Agree") (3 = 3 "Neither Agree or Disagree") (4 = 2 "Disagree") (5 = 1 "Strongly Disagree"), gen(UMS316_1)
alpha UMS312_1 UMS313_1 UMS314_1 UMS315 UMS316_1, item gen(socdom)
gen socdom1 = (socdom - 1)/4
lab var socdom1 "Social dominance orientation"

***Feeling thermometer - Mexicans
gen ftmex = UMS307/100

***Party ID
***Higher values indicate Republicans
recode pid7 (8=4), gen(pi7)
lab var pi7 "Party ID - 7pt"
gen pi1 = (pi7 - 1)/6
lab var pi1 "Party ID - 7pt"
***Dummies for party leaners
recode pi7 (1/3=1) (4/7=0), gen(dlean)
recode pi7 (1/4=0) (5/7=1), gen(rlean)
lab var dlean "Democrat, including leaners"
lab var rlean "Republican, including leaners"

***Race
recode race (1=1) (2/8=0), gen(white)
***Age
gen age1 = ((2018 - birthyr) - 18)/69
***Female
recode gender (1=0) (2=1), gen(female)
***Education
gen ed1 = (educ - 1)/5
***Political Interest
recode newsint (1=1) (2=.67) (3=.33) (4=0) (7=.5), gen(ni1)
lab var ni1 "Political interest"
***Racial resentment
recode CC18_422e (1 = 5 "Strongly agree") (2 = 4 "Somewhat agree") (3 = 3 "Neither agree nor disagree") (4 = 2 "Somewhat disagree") (5 = 1 "Strongly disagree"), gen(CC422e_1rev)
recode CC18_422h (1 = 5 "Strongly agree") (2 = 4 "Somewhat agree") (3 = 3 "Neither agree nor disagree") (4 = 2 "Somewhat disagree") (5 = 1 "Strongly disagree"), gen(CC422h_1rev)
alpha CC422e_1rev CC18_422f CC18_422g CC422h_1rev, item gen(rresent)
gen rresent1 = (rresent - 1)/4

***Explaining voter fraud typification beliefs
***SM Table 28. Model 1 - predictors of Latino voter fraud typification, white respondents, full sample
reg vflatin socdom1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 28. Model 2 - predictors of Latino voter fraud typification, white respondents, full sample
reg vflatin ftmex pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 28. Model 3 - predictors of Latino voter fraud typification, white respondents, Democrats
reg vflatin socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 28. Model 4 - predictors of Latino voter fraud typification, white respondents, Democrats
reg vflatin ftmex ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 28. Model 5 - predictors of Latino voter fraud typification, white respondents, Republicans
reg vflatin socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1
***SM Table 28. Model 6 - predictors of Latino voter fraud typification, white respondents, Republicans
reg vflatin ftmex ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1

***SM Table 29. Model 1 - predictors of Black voter fraud typification, white respondents, full sample
reg vfblack socdom1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 29. Model 2 - predictors of Black voter fraud typification, white respondents, full sample
reg vfblack rresent1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 29. Model 3 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfblack socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 29. Model 4 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfblack rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 29. Model 5 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfblack socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1
***SM Table 29. Model 6 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfblack rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1

***SM Table 30. Model 1 - predictors of white voter fraud typification, white respondents, full sample
reg vfwhite socdom1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 30. Model 2 - predictors of white voter fraud typification, white respondents, full sample
reg vfwhite rresent1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 30. Model 3 - predictors of white voter fraud typification, white respondents, Democrats
reg vfwhite socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 30. Model 4 - predictors of white voter fraud typification, white respondents, Democrats
reg vfwhite rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 30. Model 5 - predictors of white voter fraud typification, white respondents, Republicans
reg vfwhite socdom1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1
***SM Table 30. Model 6 - predictors of white voter fraud typification, white respondents, Republicans
reg vfwhite rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1

***2020 CES module
***Data file: ces20umsl.dta

***Recode variables
***Latino racism
recode UMS311 (1 = 5 "Strongly agree") (2 = 4 "Somewhat agree") (3 = 3 "Neither agree nor disagree") (4 = 2 "Somewhat disagree") (5 = 1 "Strongly disagree"), gen(UMS311_1rev)
recode UMS313 (1 = 5 "Strongly agree") (2 = 4 "Somewhat agree") (3 = 3 "Neither agree nor disagree") (4 = 2 "Somewhat disagree") (5 = 1 "Strongly disagree"), gen(UMS313_1rev)
alpha UMS311_1rev UMS312 UMS313_1rev UMS314, item gen(latracism)
lab var latracism "Latino racism"
gen latracism1 = (latracism - 1)/4
lab var latracism1 "Latino racism"

***Racial resentment
recode CC20_441a (1 = 5 "Strongly agree") (2 = 4 "Somewhat agree") (3 = 3 "Neither agree nor disagree") (4 = 2 "Somewhat disagree") (5 = 1 "Strongly disagree"), gen(CC441a_1rev)
alpha CC441a_1rev CC20_441b, item gen(rresent)
gen rresent1 = (rresent - 1)/4
lab var rresent1 "Racial resentment"

***Political Interest
recode newsint (1=1) (2=.67) (3=.33) (4=0) (7=.5), gen(ni1)
lab var ni1 "Political interest"

***Voter fraud typification
gen vflatin = UMS357_1/100
gen vfblack = UMS356_1/100
gen vfwhite = UMS355_1/100
lab var vflatin "Voter fraud typification - latinx"
lab var vfblack "Voter fraud typification - black"
lab var vfwhite "Voter fraud typification - white"

***Party ID
***Higher values indicate Republicans
recode pid7 (8=4), gen(pi7)
lab var pi7 "Party ID - 7pt"
gen pi1 = (pi7 - 1)/6
lab var pi1 "Party ID - 7pt"
***Dummies for party leaners
recode pi7 (1/3=1) (4/7=0), gen(dlean)
recode pi7 (1/4=0) (5/7=1), gen(rlean)
lab var dlean "Democrat, including leaners"
lab var rlean "Republican, including leaners"

***Race
recode race (1=1) (2/8=0), gen(white)
***Female
recode gender (1=0) (2=1), gen(female)
***Age
gen age1 = ((2020 - birthyr) - 18)/73
***Education
gen ed1 = (educ - 1)/5

***Explaining voter fraud typification beliefs
***SM Table 31. Model 1 - predictors of Latino voter fraud typification, white respondents, full sample
reg vflatin latracism1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 31. Model 2 - predictors of Latino voter fraud typification, white respondents, Democrats
reg vflatin latracism1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 31. Model 3 - predictors of Latino voter fraud typification, white respondents, Republicans
reg vflatin latracism1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1

***SM Table 32. Model 1 - predictors of Black voter fraud typification, white respondents, full sample
reg vfblack rresent1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 32. Model 2 - predictors of Black voter fraud typification, white respondents, Democrats
reg vfblack rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 32. Model 3 - predictors of Black voter fraud typification, white respondents, Republicans
reg vfblack rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1

***SM Table 33. Model 1 - predictors of white voter fraud typification, white respondents, full sample
reg vfwhite latracism1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 33. Model 2 - predictors of white voter fraud typification, white respondents, full sample
reg vfwhite rresent1 pi1 ni1 age1 ed1 female [aw=teamweight] if white==1
***SM Table 33. Model 3 - predictors of white voter fraud typification, white respondents, Democrats
reg vfwhite latracism1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 33. Model 4 - predictors of white voter fraud typification, white respondents, Democrats
reg vfwhite rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & dlean==1
***SM Table 33. Model 5 - predictors of white voter fraud typification, white respondents, Republicans
reg vfwhite latracism1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1
***SM Table 33. Model 6 - predictors of white voter fraud typification, white respondents, Republicans
reg vfwhite rresent1 ni1 age1 ed1 female [aw=teamweight] if white==1 & rlean==1
